#coding=utf-8
import requests,json,urllib
import re

def idcard():
    #爬虫获取随机身份证号码
    s = requests.session()
    data = {'a':'action'}
    index = s.post('http://shenfenzheng.293.net/like.php',data=data)
    #通过正则取出身份证号码
    id = re.findall(r'<td><span>(.+)</span></td>',index.text)
    idcard = str(id[0])
    return idcard